package qldc.pm.tienan.searchcontainer.util.nguoicanxoaantich;

import com.liferay.portal.kernel.util.OrderByComparator;

public class DoiTuongTienAnCanXoaAnTichSearchUtil {
	public static OrderByComparator getDoiTuongTienAnCanXoaAnTichOrderByComparator(String orderByCol, String orderByType) {
		boolean orderByAsc = false;

		if(orderByType.equals("asc")) {
			orderByAsc = true;
		}

		OrderByComparator orderByComparator = null;
		if(orderByCol.equals("soDinhDanhCaNhan")) {
			orderByComparator = new SoDinhDanhCaNhanDoiTuongTienAnCanXoaAnTichComparator(orderByAsc);
		}else if(orderByCol.equals("hoTen")) {
			orderByComparator = new HoTenDoiTuongTienAnCanXoaAnTichComparator(orderByAsc);
		}else if(orderByCol.equals("ngaySinh")) {
			orderByComparator = new NgaySinhDoiTuongTienAnCanXoaAnTichComparator(orderByAsc);
		}/*else if(orderByCol.equals("ngayToaAnMoiNhat")) {
			orderByComparator = new NgayToaAnDoiTuongTienAnCanXoaAnTichComparator(orderByAsc);
		}*/

		return orderByComparator;
	}
}
